<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>咖啡菜单 - 赛博朋克咖啡屋</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        body {
            background-color: #0f172a;
            color: #e2e8f0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        .neon-text {
            text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
        }
        .coffee-card {
            background-color: #1e293b;
            border: 1px solid #0ea5e9;
            transition: all 0.3s ease;
        }
        .coffee-card:hover {
            box-shadow: 0 0 10px #0ea5e9, 0 0 20px #0ea5e9;
            transform: translateY(-5px);
        }
        .btn-neon {
            background-color: #0284c7;
            box-shadow: 0 0 5px #0284c7;
            transition: all 0.3s ease;
        }
        .btn-neon:hover {
            background-color: #0369a1;
            box-shadow: 0 0 10px #0284c7, 0 0 20px #0284c7;
        }
    </style>
</head>
<body class="min-h-screen p-4">
    <div class="max-w-4xl mx-auto">
        <h1 class="text-3xl font-bold text-center mb-4 text-cyan-400 neon-text">嗨，<span th:text="${name}"></span>！我是你的点餐助手</h1>
        <h2 class="text-2xl text-center mb-8 text-cyan-300">请选择你想要的咖啡</h2>
        
        <form th:action="@{/order}" method="post" class="space-y-6">
            <input type="hidden" name="name" th:value="${name}" />
            
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                <th:block th:each="coffee : ${coffees}">
                    <div class="coffee-card p-4 rounded-lg">
                        <label class="cursor-pointer block">
                            <div class="flex items-start space-x-4">
                                <input
                                    type="radio"
                                    name="coffeeId"
                                    th:value="${coffee.id}"
                                    required
                                    class="mt-1 h-5 w-5 text-cyan-500 focus:ring-cyan-500 border-slate-300"
                                >
                                <div class="flex-1">
                                    <h3 class="text-xl font-semibold text-cyan-200" th:text="${coffee.name}"></h3>
                                    <p class="text-lg font-bold text-white mt-1" th:text="|￥${coffee.price}|"</p>
                                    <p class="text-slate-300 mt-2" th:text="${coffee.description}"></p>
                                </div>
                            </div>
                        </label>
                    </div>
                </th:block>
            </div>
            
            <div class="mt-6">
                <label for="quantity" class="block text-lg text-cyan-200 mb-2">要来几杯呢？</label>
                <input
                    type="number"
                    id="quantity"
                    name="quantity"
                    min="1"
                    value="1"
                    required
                    class="w-full px-4 py-2 bg-slate-700 border border-cyan-500 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-cyan-400"
                >
            </div>
            
            <button
                type="submit"
                class="w-full py-3 text-white font-bold rounded-md btn-neon"
            >
                确认订单
            </button>
        </form>
    </div>
</body>
</html>